﻿using Dapper;
using IceCS.Dapper.Core;
using System;

namespace IceCS.Dapper.Cmd
{
    class Program
    {
        static void Main(string[] args)
        {
            var connStr = "Database=icezero;Data Source=mysql;User Id=root;Password=1qaz2WSX;Port=3306;Protocol=sockets;Pooling = true; Max Pool Size = 32767; Min Pool Size = 10; CharSet = utf8; ";
            var helper = new DapperHelper(connStr, DBCategory.MySql);
            if (!helper.IsConnect()) { return; }
            helper.UseDbConnection(conn =>
            {
                var result = conn.Query("select version() version;");

                Console.WriteLine(result.ToString());
            });
        }
    }
}
